package com.spring.factorybean_demo;

import org.springframework.beans.factory.FactoryBean;

/**
 * 学习：DateTimeFormatterFactoryBean的实现方式
 * FactoryBean的使用
 * 举例实现单例
 */
public class MyFactoryBean implements FactoryBean<CustomService>{

	@Override
	public CustomService getObject(){
		return new CustomService(1);
	}

	@Override
	public Class<?> getObjectType() {
		return CustomService.class;
	}

	@Override
	public boolean isSingleton() {
		return true;
	}
}

